package officeserver.report;

import java.io.Serializable;

public class Symptoms implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private String description;

    /**
     * Creates the description of the symptoms, which is the chief complains of
     * the patients
     * 
     * @param description
     */
    public Symptoms(String description) {
	this.description = description;
    }

    /**
     * gets the description
     * 
     * @return description
     */
    public String getDescription() {
	return description;
    }

    /**
     * sets the description
     * 
     * @param description
     */
    public void setDescription(String description) {
	this.description = description;
    }

    /**
     * Creates a copy of the Symptoms for passing to other classes
     * 
     * @return new Symptoms the copy of symptoms
     */
    public Symptoms clone() {
	return new Symptoms(description);
    }

    /**
     * Updates the Symptoms It will check (for Strings) if there is a field in
     * Symptoms update that is filled out. If not, it'll use the current
     * symptom's information. If it is, it will set the current prescription's
     * information to symptom's information.
     * 
     * @param update
     *            Symptom object with the newest information
     */
    public void updateSymptoms(Symptoms update) {
	this.description = (update.getDescription() == null) ? this.description
		: new String(update.getDescription());
    }
}
